package com.example.crossborderecommerce.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.crossborderecommerce.entity.Admin;
import com.example.crossborderecommerce.entity.ProductCategory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Yolanda
 * @since 2024-05-09
 */
@Mapper
public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {
    public List<Admin> findAdminsInProductCategory();
    public List<ProductCategory> getProductCategoryByPage(Page<ProductCategory> page,
                                                          @Param("adminId") String adminId,
                                                          @Param("parentCategoryName") String parentCategoryName,
                                                          @Param("name") String name);
    public List<ProductCategory> getProductCategory(@Param("adminId") String adminId,
                                                    @Param("parentCategoryName") String parentCategoryName,
                                                    @Param("name") String name);
}
